home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / GoldED Tools / Macro Collection / Oberon / OC_OL_BLink.ged < prev    next >
Encoding:
Text File  |  1996-09-27  |  3.2 KB  |  110 lines

  1. /*
  2. ** $VER: OC_OL_BLink 0.008 (18 Oct 1994) ***
  3. **
  4. ** (c) © 1994 Oliver Clouth
  5. **
  6. ** Function : Compiliere_Pre-Link_BLink
  7. **
  8. */
  9.  
  10.  
  11. OPTIONS RESULTS                             /* enable return codes     */
  12.  
  13. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  14.     address 'GOLDED.1'
  15.  
  16. 'LOCK CURRENT'                              /* lock GUI, gain access   */
  17. OPTIONS FAILAT 6                            /* ignore warnings         */
  18. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  19.  
  20. host = ADDRESS()                              /* get GED's port    */
  21.  
  22. /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
  23.  
  24. 'QUERY CAT'
  25. isGerman = (result = "deutsch")
  26.  
  27. 'QUERY ANYTEXT'
  28.  
  29. if (result = 'TRUE') then 
  30.  
  31.     do
  32.         'QUERY DOC VAR OLDNAME'             /* remember current file name */
  33.         
  34.         'QUERY PATH Var PFAD'
  35.         'QUERY FILE VAR FNAME'              /* Nur den Filenamen in Var FNAME */
  36.        
  37.              Name = left(FNAME, Pos('.', FNAME) - 1)
  38.          InfoName = PFAD || '/' || Name
  39.  
  40.         call pragma 'D', PFAD  /* Aktuelles Verzeichnis wechseln */
  41.         Code = EXISTS(Code)
  42.  
  43.         if (Code) then
  44.         do
  45.           say
  46.           say 'Das Unterverzeichnis »' PFAD'/Code « ist schon vorhanden !'
  47.           say
  48.           call pragma 'Stack', 10000
  49.           shell
  50.           'Oberon-A:C/OC NS SYM Code/ DST Code/ DEBUG' Name'.mod'
  51.           'Oberon-A:C/OL SRC Code/ DST Code/' Name
  52.           'Oberon-A:C/BLink WITH Code/'Name'.with VERBOSE NODEBUG SMALLCODE SMALLDATA'
  53.         end
  54.         else do
  55.           say
  56.           say 'Mußte das Unterverzeichnis »' PFAD'/Code « anlegen !!'
  57.           say
  58.           call pragma 'Stack', 10000
  59.           shell
  60.           'Makedir Code'
  61.           'Oberon-A:C/OC NS SYM Code/ DST Code/ DEBUG' Name'.mod'
  62.           'Oberon-A:C/OL SRC Code/ DST Code/' Name
  63.           'Oberon-A:C/BLink WITH Code/'Name'.with VERBOSE NODEBUG SMALLCODE SMALLDATA'
  64.         end
  65.  
  66.         ok = (RC = 0)
  67.  
  68.         shell                               /* address host (GoldED) */
  69.  
  70.         'NAME NEW ' || oldname              /* restore old file name */
  71.         
  72.         if (ok) then do
  73.  
  74.           if (isGerman) then
  75.             'REQUEST BODY="EXE Icon zuweisen ?" BUTTON="_Ja|_Nein" VAR ICON'
  76.           else
  77.             'REQUEST BODY="EXE Icon ?" BUTTON="_Yes|_No" VAR ICON'
  78.         
  79.           IF (ICON) then do
  80.             shell                                                   /* address shell */ 
  81.             'Copy GoldED:Arexx/Oberon-A/exe.info to' InfoName'.info'
  82.             shell                                                   /* address host (GoldED) */
  83.           END
  84.             
  85.             if (isGerman) then
  86.                 'REQUEST BODY="Oberon fertig.|Program _'Name'_ starten ?" BUTTON="_starten|_abbrechen"'
  87.             else
  88.                 'REQUEST BODY="Oberon done.|Run program _'Name'_?" BUTTON="_run|_cancel"'
  89.  
  90.             IF (result) THEN
  91.             do
  92.               'QUERY CON VAR CON'
  93.               shell
  94.                 Name
  95.               shell
  96.             end
  97.         end
  98.     end
  99.  
  100. else do
  101.  
  102.     if (isGerman) then
  103.         'REQUEST BODY="Kein Text vorhanden ?!"'
  104.     else
  105.         'REQUEST BODY="Text buffer is empty ?!"'
  106. end
  107.  
  108. 'UNLOCK' /* VERY important: unlock GUI */
  109. Exit
  110.